package com.zzzyh.forumsystemclient.cotroller;

import com.zzzyh.forumsystemclient.common.AppResult;
import com.zzzyh.forumsystemclient.dao.CategoryMapper;
import com.zzzyh.forumsystemclient.model.Category;
import com.zzzyh.forumsystemclient.services.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CategoryController {
    @Autowired
    private ICategoryService categoryService;
    @RequestMapping("/sys/category/all")
    public AppResult<List<Category>> all(){
        return AppResult.success(categoryService.categorieAll());
    }
}
